package me.keiwu.pub.rpc;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * Created by kei on 03/11/2017.
 */
public interface UserRpcPub {

	@RequestMapping("/rpc/user/info")
	String userInfo(@RequestParam("userId") Long userId);

	@RequestMapping("/rpc/user/info/cache")
	String userInfoCache(@RequestParam("userId") Long userId);

	@RequestMapping("/rpc/user/list")
	String getUserList(@RequestParam("idList") String idList);

	@RequestMapping("/rpc/user/login/daily")
	String dailyLoginUser(@RequestParam("nickName") String nickName, @RequestParam("page") Integer page,
			@RequestParam("size") Integer size);

	@RequestMapping("/rpc/user/login/history")
	String historyLoginUser(@RequestParam("nickName") String nickName, @RequestParam("page") Integer page,
			@RequestParam("size") Integer size);

	@RequestMapping("/rpc/user/gold/get")
	Integer getUserGold(@RequestParam("userId") Long userId);

	@RequestMapping("/rpc/user/gold/update")
	boolean updateGold(@RequestParam("userId") Long userId, @RequestParam("newGold") Integer newGold);

	@RequestMapping("/rpc/user/gold/change")
	boolean changeGold(@RequestParam("userId") Long userId, @RequestParam("gold") Integer gold);

	@RequestMapping("/rpc/user/steps/scope")
	Integer getUserStepsScope(@RequestParam("userId") Long userId, @RequestParam("fromDays") Integer fromDays,
			@RequestParam("toDays") Integer toDays);

	@RequestMapping("/rpc/user/steps/daily")
	Integer getUserStepsDaily(@RequestParam("userId") Long userId);

	@RequestMapping("/rpc/user/findWithoutUsers")
	String findWithoutUsers(@RequestParam("withoutList") String withoutList, @RequestParam("nickName") String nickName,
			@RequestParam("page") Integer page, @RequestParam("size") Integer size);

	@RequestMapping("/rpc/user/hasComment")
    boolean hasComment(@RequestParam("userId") Long userId,
                       @RequestParam("otherId") Long otherId);
	
	@RequestMapping("/rpc/user/userForm/saveUserForm")
	String saveUserForm(@RequestParam("userId") Long userId, @RequestParam("formId") String formId,
			@RequestParam("action") String action);

	@RequestMapping("/rpc/user/userForm/findUserForm")
	String getUserForm(@RequestParam("userId") Long userId);

	@RequestMapping("/rpc/user/userForm/deleteExpiredForm")
	boolean deleteExpiredForm();

	@RequestMapping("/rpc/user/userForm/updateUsedForm")
	boolean updateUsedForm(@RequestParam("formId") String formId);

	@RequestMapping("/rpc/user/userForm/deleteUsedForm")
	boolean deleteUsedForm(@RequestParam("id") Long id);

	@RequestMapping("/rpc/user/inactiveUsers")
	String getInactiveUsers(@RequestParam("page") Integer page,
							 @RequestParam("size") Integer size);
}
